<!-- 基本信息 -->
<div class="monitor-tab-div">
	<div class="m-panel">
		<div class="m-panel-title">
			<span>基本信息</span>
		</div>
		<div class="m-panel-body base-info-div">
			<form class="bs-example form-horizontal xs-form">
	            <div id="base_info_monitor_div">
	            	<div class="form-group">
	                    <label class="col-lg-2 control-label">监控器名称：</label>
	                    <label class="col-lg-4 control-label tl" data-id="monitorName"></label>
	                    <label class="col-lg-2 control-label">监控器类型：</label>
	                    <label class="col-lg-4 control-label tl" data-id="monitorTypeName"></label>
	                </div>
	            </div>
	            <div id="asset_info_monitor_div">
	            	<div class="form-group"></div>
	                <div class="form-group">
	                    <label class="col-lg-2 control-label">被监控资产名称：</label>
	                    <label class="col-lg-4 control-label tl" data-id="assetName"></label>
	                    <label class="col-lg-2 control-label">资产类型：</label>
	                    <label class="col-lg-4 control-label tl" data-id="assetTypeName"></label>
	                </div>
	                <div class="form-group">
	                    <label class="col-lg-2 control-label">IP：</label>
	                    <label class="col-lg-4 control-label tl" data-id="mainIp"></label>
	                    <label class="col-lg-2 control-label">管控域：</label>
	                    <label class="col-lg-4 control-label tl" data-id="securityDomainName"></label>
	                </div>
	                <div class="form-group">
	                    <label class="col-lg-2 control-label">操作系统：</label>
	                    <label class="col-lg-4 control-label tl" data-id="osTypeName"></label>
	                    <label class="col-lg-2 control-label" style="display: none;">物理位置：</label>
	                    <label class="col-lg-4 control-label tl" data-id="locationCbName" style="display: none;"></label>
	                </div>
	            </div>
	        </form>
	    </div>
	</div>
	<div class="box">
		<div class="box-item" style="width:100%">
			<!-- CPU使用率-->
			<div class="m-panel">
				<div class="m-panel-title">
					<span>CPU使用率</span>
				</div>
				<div class="m-panel-body">
					<div id="cpu_use_line_chart" class="monitor-chart"></div>
				</div>
			</div>
		</div>
	</div>
	<!-- 动态信息 -->
    <div class="m-panel">
        <div class="m-panel-title">
            <span>动态信息</span>
        </div>
        <div class="m-panel-body" id="dynamics_info_div">
            <div class="m-panel-body-card">
                <ul>
                    <li class="active" data-action="interface_chart">接口使用动态信息</li>
                    <li data-action="page_chart">卷使用动态信息</li>
                    <li data-action="mdisk_chart">MDisk使用动态信息</li>
                </ul>
            </div>
            <div class="table-div" id="dynamics_info_table" style="height:300px"></div>
        </div>
    </div>
    <!-- 状态信息 -->
    <div class="m-panel">
        <div class="m-panel-title">
            <span>状态信息</span>
        </div>
        <div class="m-panel-body" id="status_info_div">
            <div class="m-panel-body-card">
                <ul>
                    <li class="active" data-action="buffer_status_list">电池状态信息</li>
                    <li data-action="disk_status_list">磁盘状态信息</li>
                </ul>
            </div>
            <div class="table-div" id="status_info_table" style="height:300px"></div>
        </div>
    </div>
</div>

<div class="monitor-tab-div" data-type="event"></div>


<script type="text/javascript">
$(document).ready(function (){
require(['/js/plugin/monitor/catagory/ibm_storage.js'] ,function (ibm_storage){

var urlParamObj = index_query_param_get()

view_init()

function view_init()
{
    urlParamObj.time = $("#query_time_label").text()
    urlParamObj.inputTime = $("#query_time_label").text()
    urlParamObj.edId = urlParamObj.assetId
    ibm_storage.base_info(urlParamObj)
    ibm_storage.cpu_use_chart($("#cpu_use_line_chart") ,urlParamObj,"cpu")
    dynamics_info_render()
    status_info_render()
}

// 动态信息
function dynamics_info_render(){
    var el_ul = $("#dynamics_info_div").find("ul")
    el_ul.find("li").unbind("click")

    el_ul.find("li").click(function (){
        $(this).siblings().removeClass("active")
        $(this).addClass("active")
        ibm_storage[$(this).attr("data-action")]($("#dynamics_info_table") ,urlParamObj)
    })

    ibm_storage.interface_chart($("#dynamics_info_table") ,urlParamObj)
}

// 状态信息
function status_info_render(){
    var el_ul = $("#status_info_div").find("ul")
    el_ul.find("li").unbind("click")

    el_ul.find("li").click(function (){
        $(this).siblings().removeClass("active")
        $(this).addClass("active")
        ibm_storage[$(this).attr("data-action")]($("#status_info_table") ,urlParamObj)
    })

    ibm_storage.buffer_status_list($("#status_info_table") ,urlParamObj)
}

window.index_monitor_init = function ()
{
    view_init()
}

});
});